<%@page import="com.daoshun.common.CommonUtils"%>
<%@ page language="java"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<link rel="stylesheet" type="text/css"
	href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/docs.css" />
<link rel="stylesheet" type="text/css" href="css/common.css" />


<!-- navigation -->
<div class="navbar navbar-inverse navbar-fixed-top"
	style="background-color: #0F12A1">
	<div class="navbar-inner">
		<div class="container">
			<div class="topbar-logo-wrap"
				style="height: 49px; background-color: #033BC8;">
				<ul class="navbar-list">
					<li><a class="on" href="javascript:">后台管理</a></li>

				</ul>
			</div>
			<div class="topbar-logo-wrap" style="float: right">
				<ul class="navbar-list">
					<li><a href="logout">退出</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>
<div style="float: left; width: 190px;">
<input type="hidden" name="admintype"
			value="${ sessionScope.adminType }"> <input type="hidden"
			name="permission" value="${ sessionScope.permission }">
	<ul class="nav nav-list bs-docs-sidenav affix-top well">
		<li class="mainmenu"><a href="#">菜单</a></li>
		<li id="b1_0" class="menu" onclick="changemenu(1)" style="display: none;"><a href="#">banner管理</a></li>
		<li id="b1_1" class="bar_1 submenu_1_1 " style="display: none;"><a
			href="bannerinfo" style="padding-left: 45px;">banner管理</a></li>
<!-- 		<li class="bar_1 submenu_1_2" style="display: block;"><a -->
<!-- 			href="eventtypeinfo" style="padding-left: 45px;">活动分类管理</a></li> -->
<!-- 		<li class="bar_1 submenu_1_3" style="display: block;"><a -->
<!-- 			href="eventinfo" style="padding-left: 45px;">活动信息</a></li> -->
		<li id="b2_0" class="menu" onclick="changemenu(2)"style="display: none;"><a href="#">用户管理</a></li>
		<li id="b2_1" class="bar_2 submenu_2_1" style="display: none;"><a
			href="userinfo" style="padding-left: 45px;">用户信息</a></li>
		<li id="b2_2" class="bar_2 submenu_2_2" style="display: none;"><a
			href="hobbyinfo" style="padding-left: 45px;">爱好管理</a></li>
		<li id="b2_3" class="bar_2 submenu_2_3" style="display: none;"><a
			href="lvinfo" style="padding-left: 45px;">等级管理</a></li>
		<li id="b2_5" class="bar_2 submenu_2_5" style="display: none;"><a
			href="accuseinfo" style="padding-left: 45px;">举报管理</a></li>
		<li id="b3_0" class="menu" onclick="changemenu(6)" style="display: none;"><a href="#">内容管理</a></li>
		<li id="b3_1" class="bar_6 submenu_6_1" style="display: none;"><a
			href="momentinfo" style="padding-left: 45px;">发布管理</a></li>
		<li id="b3_2" class="bar_6 submenu_6_2" style="display: none;"><a
			href="commentinfo" style="padding-left: 45px;">评论管理</a></li>
		<li id="b3_3" class="bar_6 submenu_6_3" style="display: none;"><a
			href="feedbackinfo" style="padding-left: 45px;">反馈管理</a></li>
		<li id="b4_0" class="menu" onclick="changemenu(7)" style="display: none;"><a href="#">精选管理</a></li>
		<li id="b4_1" class="bar_7 submenu_7_1" style="display: none;"><a
			href="choicenessinfo" style="padding-left: 45px;">精选发布</a></li>
		<li id="b4_2" class="bar_7 submenu_7_2" style="display: none;"><a
			href="homeuserinfo" style="padding-left: 45px;">主页用户管理</a></li>
<!-- 		<li class="menu" onclick="changemenu(3)"><a href="#">礼物管理</a></li> -->
<!-- 		<li class="bar_3 submenu_3_1" style="display: block;"><a -->
<!-- 			href="giftinfo" style="padding-left: 45px;">礼物信息</a></li> -->
		
		<li id="b5_0" class="menu" onclick="changemenu(4)" style="display: none;"><a href="#">充值管理</a></li>
		<li id="b5_3" class="bar_4 submenu_4_1" style="display: none;"><a
			href="chargerecordinfo" style="padding-left: 45px;">充值记录查询</a></li>
		<li id="b5_1" class="bar_4 submenu_4_2" style="display: none;"><a
			href="exchange" style="padding-left: 45px;">消费记录查询</a></li>
		<li id="b5_2" class="bar_4 submenu_4_3" style="display: none;"><a
			href="chargecardinfo" style="padding-left: 45px;">充值卡管理</a></li>
		<li id="b6_0" class="menu" onclick="changemenu(5)" style="display: none;"><a href="#">系统管理</a></li>

		<li id="b6_2" class="bar_5 submenu_5_2" style="display: none;"><a
			href="noticeinfo" style="padding-left: 45px;">系统消息管理</a></li>
		<li id="b6_3" class="bar_5 submenu_5_3" style="display: none;"><a
			href="helpinfo" style="padding-left: 45px;">帮助信息管理</a></li>	
		<%
			String adminType = request.getSession().getAttribute("adminType") + "";
			int type = CommonUtils.parseInt(adminType, 0);
			if (type==1) {
		%>
<!-- 		<li id="b6_0" class="menu" onclick="changemenu(5)" style="display: block;"><a href="#">系统管理</a></li> -->
		<li id="b6_1" class="menu" onclick="changemenu(8)" style="display: block;"><a
			href="#">后台用户管理</a></li>
		<li id="b6_1" class="bar_8 submenu8__1" onclick="changemenu(8)" style="display: block;"><a
			href="admininfo"style="padding-left: 45px;">后台用户信息管理</a></li>
		<%
			}
		%>
	</ul>
</div>
<script type="text/javascript">
	function changemenu(index) {
		$(".bar_" + index).slideToggle("slow");
	}

			
			
			$(function() {
// 				var admintype = $('input[name=admintype]').val();
// 				if (admintype == 0) {
// 					$('#bili_1').css('display', 'block');
// 					$('#bili_5').css('display', 'block');
// 					$('#bili_7').css('display', 'block');
// 					$('#bili_9').css('display', 'block');
// 					$('#bili_10').css('display', 'block');
// 					$('#bili_11').css('display', 'block');
// 					$('#bili_12').css('display', 'block');
// 				}
// 				1,5,3,6,7,9,10,12,11
				var permission = $('input[name=permission]').val();
				var permissions = permission.split(',');
				for (var int = 0; int < permissions.length; int++) {
					switch(permissions[int]) {
						case '1':
							$('#b1_0').css('display', 'block');
							$('#b1_1').css('display', 'block');
						break;
						case '2':
							$('#b2_0').css('display', 'block');
							$('#b2_1').css('display', 'block');
							$('#b2_2').css('display', 'block');
							$('#b2_3').css('display', 'block');
							$('#b2_4').css('display', 'block');
							$('#b2_5').css('display', 'block');
						break;
						case '3':
							$('#b3_0').css('display', 'block');
							$('#b3_1').css('display', 'block');
							$('#b3_2').css('display', 'block');
							$('#b3_3').css('display', 'block');
						break;
						case '4':
							$('#b4_0').css('display', 'block');
							$('#b4_1').css('display', 'block');
							$('#b4_2').css('display', 'block');
						break;
						case '5':
							$('#b5_0').css('display', 'block');
							$('#b5_1').css('display', 'block');
							$('#b5_2').css('display', 'block');
							$('#b5_3').css('display', 'block');
						break;
						case '6':
							$('#b6_0').css('display', 'block');
// 							$('#b6_1').css('display', 'block');
							$('#b6_2').css('display', 'block');
							$('#b6_3').css('display', 'block');
						break;
						
					}
				}
			});
		</script>
<!--/navigation-->